<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/



// 认证路由...
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');


// 注册路由...
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');

Route::group(['middleware' => 'auth', 'namespace' => 'Admin', 'prefix' => 'admin'], function() {
    Route::any('/', 'HomeController@index');
    Route::resource('home','admin\HomeController');
    Route::resource('cate','admin\CateController');
    Route::resource('tags','admin\TagsController');
    Route::resource('nav','admin\NavigationController');
    Route::resource('links','admin\LinksController');
    Route::resource('user','admin\UserController');



    //图书管理
    Route::resource('book','admin\BookController');
    Route::resource('borrow','admin\BorrowController');
});
